package com.godz.controller.index3;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.godz.mapper.index3WorkExpMapper;
import com.godz.pojo.index3WorkExp;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
public class workController {

    final
    index3WorkExpMapper workExpMapper;//工作经历详细

    public workController(index3WorkExpMapper workExpMapper) {
        this.workExpMapper = workExpMapper;
    }

    @RequestMapping("/index3/work")
    public String index3work(Model model,@RequestParam(value = "id") int id){
        QueryWrapper<index3WorkExp> wrapper = new QueryWrapper<index3WorkExp>().eq("id", id);
        index3WorkExp workExp = workExpMapper.selectOne(wrapper);
        model.addAttribute("workExp",workExp);
        return "index3WorkExp";
    }
}
